package com.company.core.exception;

import lombok.Data;

/**
 * @author lcl
 * @Title: ValidatorArgsException
 * @ProjectName smart-planet
 * @Description: 自定义 校验参数异常
 * @date 2018/10/12下午4:50
 */
@Data
public class ValidatorArgsException extends RuntimeException{

    private static final long serialVersionUID = -298311232780807293L;
    private String msg;
    private int code = 500;

    public ValidatorArgsException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public ValidatorArgsException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public ValidatorArgsException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public ValidatorArgsException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}
